--- configure.orig	2011-07-04 23:15:01.000000000 +0200
+++ configure	2011-11-05 15:17:01.946744829 +0100
@@ -1600,6 +1600,10 @@
     nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
 esac
 
+# Add additional flags from the environment
+bytecccompopts="$bytecccompopts $CFLAGS"
+nativecccompopts="$nativecccompopts $CFLAGS"
+
 # Finish generated files
 
 cclibs="$cclibs $mathlib"
